package com.kantboot.functional.pay.order.repository;

import com.kantboot.functional.pay.order.module.entity.FunctionalPayOrder;
import jakarta.transaction.Transactional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface FunctionalPayOrderRepository extends JpaRepository<FunctionalPayOrder,Long> {

    @Modifying
    @Transactional
    @Query("""
        update FunctionalPayOrder set statusCode = :statusCode where id = :id
    """)
    void updateStatusCodeById(
            @Param("id") Long id,
            @Param("statusCode") String statusCode);

}
